export const nameFont = (len: number) => {
  const fontSetting = {
    fontSize: 45, //默认字体大小
    startY: 0, //Y方向起始偏移
    lineSize: 0, //行间距离
  }
  if (len <= 2) {
    fontSetting.startY = 15
    fontSetting.lineSize = 15 + fontSetting.fontSize
  } else if (len === 3) {
    fontSetting.startY = 15
    fontSetting.lineSize = 10 + fontSetting.fontSize
  } else if (len === 4) {
    fontSetting.startY = 10
    fontSetting.fontSize = 42
    fontSetting.lineSize = 7.5 + fontSetting.fontSize
  } else if (len > 4) {
    fontSetting.startY = -5
    fontSetting.fontSize = 45 - (len - 3) * 3
    fontSetting.lineSize = fontSetting.fontSize
  }
  return fontSetting
}
